package com.grapecc.springcloud.service;

import com.grapecc.springcloud.entities.CommonResult;
import com.grapecc.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 卖糖的兜兜
 * @version 1.0.0
 * @ClassName PaymentFeignService.java
 * @Description TODO
 * @createTime 2022年02月10日 15:39:00
 */
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    @GetMapping("/payment/get/{id}")
    public CommonResult<Payment> getPayment(@PathVariable("id") Long id);


    @RequestMapping("/payment/feign/timeout")
    public String paymentFeignTimeout();
}
